﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt.mysql
{
	// Token: 0x0200015A RID: 346
	public class TMySQLRepeatStmt : TBlockSqlStatement
	{
		// Token: 0x06000BB8 RID: 3000 RVA: 0x00306845 File Offset: 0x00304A45
		public TMySQLRepeatStmt(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstmysqlrepeatstmt;
		}

		// Token: 0x06000BB9 RID: 3001 RVA: 0x00306859 File Offset: 0x00304A59
		internal override void buildsql()
		{
		}

		// Token: 0x06000BBA RID: 3002 RVA: 0x0030685B File Offset: 0x00304A5B
		internal override void clear()
		{
		}

		// Token: 0x06000BBB RID: 3003 RVA: 0x0030685D File Offset: 0x00304A5D
		internal override string getasprettytext()
		{
			return "";
		}

		// Token: 0x06000BBC RID: 3004 RVA: 0x00306864 File Offset: 0x00304A64
		internal virtual void iterate(TVisitorAbs pvisitor)
		{
		}

		// Token: 0x06000BBD RID: 3005 RVA: 0x00306868 File Offset: 0x00304A68
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			TRepeatSqlNode trepeatSqlNode = (TRepeatSqlNode)this.rootNode;
			base.doParseStatement(psql);
			this.condition = trepeatSqlNode.Condition;
			trepeatSqlNode.Stmts.doParse(this, ESqlClause.unknown);
			for (int i = 0; i < trepeatSqlNode.Stmts.size(); i++)
			{
				this.BodyStatements.add(trepeatSqlNode.Stmts.getStatementSqlNode(i).Stmt);
			}
			return 0;
		}

		// Token: 0x17000226 RID: 550
		// (get) Token: 0x06000BBE RID: 3006 RVA: 0x003068DF File Offset: 0x00304ADF
		// (set) Token: 0x06000BBF RID: 3007 RVA: 0x003068E7 File Offset: 0x00304AE7
		public virtual TExpression Condition
		{
			get
			{
				return this.condition;
			}
			set
			{
				this.condition = value;
			}
		}

		// Token: 0x06000BC0 RID: 3008 RVA: 0x003068F0 File Offset: 0x00304AF0
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000BC1 RID: 3009 RVA: 0x00306900 File Offset: 0x00304B00
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			this.BodyStatements.accept(v);
			v.postVisit(this);
		}

		// Token: 0x040012C1 RID: 4801
		private TExpression condition;
	}
}
